package test.com.flexoop.utilities.dateutils {

	import com.flexoop.utilities.dateutils.DateUtils;
	
	import org.flexunit.Assert;
	
	public class DateTimeFormatTest {
		
		public function DateTimeFormatTest() {
		}
		
		[Test]
	    public function testShortDateShortTime():void {
			Assert.assertEquals( 'short date mask + short time mask format test', '05/17/08 7:03 AM', DateUtils.dateTimeFormat( new Date( 2008, 4, 17, 7, 3 ), DateUtils.SHORT_DATE_MASK + ' ' + DateUtils.SHORT_TIME_MASK ) );
	    }
	    
		[Test]
	    public function testShortDateMediumTime():void {
			Assert.assertEquals( 'short date mask + medium time mask format test', '08/27/06 3:44:00 PM', DateUtils.dateTimeFormat( new Date( 2006, 7, 27, 15, 44 ), DateUtils.SHORT_DATE_MASK + ' ' + DateUtils.MEDIUM_TIME_MASK ) );
	    }

		/* removed long time mask due to timezone building */
		/* [Test]
	    public function testShortDateShortTime():void {
			Assert.assertEquals( 'short date mask + long time mask format test', '02/20/09 7:18:28 PM', DateUtils.dateTimeFormat( new Date( 2009, 1, 20, 19, 18, 28 ), DateUtils.SHORT_DATE_MASK + ' ' + DateUtils.LONG_TIME_MASK ) );
	    } */

		[Test]
	    public function testMediumDateShortTime():void {
			Assert.assertEquals( 'medium date mask + short time mask format test', 'Jul 12, 2004 2:01 AM', DateUtils.dateTimeFormat( new Date( 2004, 6, 12, 2, 1 ), DateUtils.MEDIUM_DATE_MASK + ' ' + DateUtils.SHORT_TIME_MASK ) );
	    }


		[Test]
	    public function testMediumDateMediumTime():void {
			Assert.assertEquals( 'medium date mask + medium time mask format test', 'Dec 9, 2007 6:03:00 PM', DateUtils.dateTimeFormat( new Date( 2007, 11, 9, 18, 3 ), DateUtils.MEDIUM_DATE_MASK + ' ' + DateUtils.MEDIUM_TIME_MASK ) );
	    }


		[Test]
	    public function testLongDateShortTime():void {
			Assert.assertEquals( 'long date mask + short time mask format test', 'September 9, 2002 2:54 PM', DateUtils.dateTimeFormat( new Date( 2002, 8, 9, 14, 54 ), DateUtils.LONG_DATE_MASK + ' ' + DateUtils.SHORT_TIME_MASK ) );
	    }

		[Test]
	    public function testLongDateMediumTime():void {
			Assert.assertEquals( 'long date mask + medium time mask format test', 'June 17, 2009 6:48:00 PM', DateUtils.dateTimeFormat( new Date( 2009, 5, 17, 18, 48 ), DateUtils.LONG_DATE_MASK + ' ' + DateUtils.MEDIUM_TIME_MASK ) );
	    }

		[Test]
	    public function testFullDateShortTime():void {
			Assert.assertEquals( 'full date mask + short time mask format test', 'Saturday, November 19, 2005 5:22 AM', DateUtils.dateTimeFormat( new Date( 2005, 10, 19, 5, 22 ), DateUtils.FULL_DATE_MASK + ' ' + DateUtils.SHORT_TIME_MASK ) );
	    }

		[Test]
	    public function testFullDateMediumTime():void {
			Assert.assertEquals( 'full date mask + medium time mask format test', 'Friday, August 4, 2006 10:41:00 PM', DateUtils.dateTimeFormat( new Date( 2006, 7, 4, 22, 41 ), DateUtils.FULL_DATE_MASK + ' ' + DateUtils.MEDIUM_TIME_MASK ) );
	    }

	}
}